package com.zut.movie.mapper;

import com.zut.movie.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UserMapper {


    @Select("select id, openid , user_avatarurl as userAvatarUrl, user_name as userName from user where openid = #{openid}")

    User getById(String openid);

    @Insert("insert into user(openid) values(#{openid})")
    void insertId(String openid);


    void updateUser(User user);
}
